package cn.kgc.service.impl;

import cn.kgc.entity.School;
import cn.kgc.mapper.SchoolMapper;
import cn.kgc.service.SchoolService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SchoolServiceImpl implements SchoolService{
    @Autowired
    private SchoolMapper schoolMapper;


    @Override
    public List<School> getAllSchool(Integer page,Integer limit,String schoolName) {
        return schoolMapper.getAllSchool(page,limit,schoolName);
    }

    @Override
    public Integer getCount() {
        return schoolMapper.getCount();
    }

    @Override
    public Integer addSchool(School school) {
        return schoolMapper.addSchool(school);
    }

    @Override
    public Integer updateStudentJson(School school) {
        return schoolMapper.updateStudentJson(school);
    }

    @Override
    public Integer deleteStudents(Integer schId) {
        return schoolMapper.deleteStudents(schId);
    }

    @Override
    public Integer delSchools(String schId) {
        return schoolMapper.delSchools(schId);
    }
}
